From 2e9ec6bae2a5233848fcd626d4b1687875e60f41 Mon Sep 17 00:00:00 2001 From: justbur Date: Mon, 6 Jul 2015 15:25:49 -0400 Subject: [PATCH] Fix compiler warnings --- .gitignore | 1 + which-key.el | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 34da34edea6..77633d2fc83 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *~ +*.elc # Used to setup library paths for emacs -Q private-test-setup.el diff --git a/which-key.el b/which-key.el index 728fdb138bc..7f5229d3f08 100644 --- a/which-key.el +++ b/which-key.el @@ -21,6 +21,8 @@ ;;; Code: +(require 's) + (defvar which-key-idle-delay 0.6 "Delay (in seconds) for which-key buffer to popup.") ;; (defvar which-key-close-buffer-idle-delay 4 @@ -97,14 +99,11 @@ Used when `which-key-popup-type' is frame.") (remove-hook 'pre-command-hook #'which-key/hide-popup) (remove-hook 'focus-out-hook #'which-key/stop-open-timer) (remove-hook 'focus-in-hook #'which-key/start-open-timer) - (which-key/stop-open-timer) - (which-key/stop-close-timer))) + (which-key/stop-open-timer))) + ;; (which-key/stop-close-timer))) (defun which-key/setup () "Create buffer for which-key." - (require 'cl) - (require 's) -;; (require 'popwin) (setq which-key--buffer (get-buffer-create which-key-buffer-name)) (with-current-buffer which-key--buffer (setq-local cursor-type nil) @@ -364,7 +363,7 @@ the maximum number of lines availabel in the target buffer." (dotimes (i n-lines) (setq lines (push - (subseq keys (* i n-columns) (min n-keys (* (1+ i) n-columns))) + (seq-subseq keys (* i n-columns) (min n-keys (* (1+ i) n-columns))) lines))) (mapconcat (lambda (x) (apply 'concat x)) (reverse lines) "\n"))) @@ -385,7 +384,7 @@ the maximum number of lines availabel in the target buffer." (dotimes (p n-pages) (setq pages (push (which-key/create-page max-height n-columns - (subseq formatted-keys (* p max-keys/page) + (seq-subseq formatted-keys (* p max-keys/page) (min (* (1+ p) max-keys/page) n-keys))) pages))) ;; not doing anything with other pages for now (setq pages (reverse pages) -- 2.30.2